Task 1:

Dmytro Geleshko

Imports

Load images

Function for plotting images later

Image 1

Preview

Adjusting hsv value (and zeroing out the saturation)

Thresholding

Morphological transformation (Opening)

Image 2

Preview

Applying shadow/highlight (trying to reacreate GIMP function)

Adaptive equalization

Thresholding

Morphological transformation (Opening)

Image 3

Preview

Looking through channels

Morphological transformation (Opening)

Thresholding (OTSU)

Image 4

Preview

Looking through channels

Inverting one the second (green) channel

BGR2GRAY

Thresholding (OTSU)

Morphological transformation (Opening)

Image 5

Preview

Adaptive equalization

Noise reduction (Morphological closing)

Adaptive thresholding

Morphological transformation (Opening)

Image 6

Preview

Removing the saturation

Global equalization

Noise reduction (Morphological transformations)

Thresholding (OTSU)

Image 7

Preview

Adaptive equalization

Removing the saturation

Global equalization

Noise reduction (Morphological closing)

Thresholding (OTSU)

Morphological transformation (Opening)

Image 8

Preview

Adaptive equalization

Removing the saturation

Global equalization

Noise reduction (Morphological closing)

Adaptive thresholding

Noise reduction (Morphological closing)

Image 9

Preview

Thresholding (OTSU)

Image 10

Preview

Detecting edges

Filling the background

Inverting

Results

Some more work can be done like filtering, adjusting parameters, removing artifacts near the borders.

The End